//
//  ReplyMineTableViewCell.m
//  GLGW_Shoping
//
//  Created by whx on 2018/12/3.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "ReplyMineTableViewCell.h"

@implementation ReplyMineTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        GLGWImageView *imagV = [[GLGWImageView alloc] initInSuperView:self.contentView];
        [imagV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(@(kWidthProportion_In_iPhoneTriploid(15)));
            make.top.equalTo(@(kHeightProportion_In_iPhoneTriploid(18)));
            make.width.height.equalTo(@(kWidthProportion_In_iPhoneTriploid(44)));
        }];
        imagV.backgroundColor = kRandomColor;
        imagV.layer.masksToBounds = YES;
        imagV.layer.cornerRadius = 22;
        
        //    GLGWLabel *label = [[GLGWLabel alloc] initWithFrame:CGRectMake(titleX, titleY, titleW, titleH) theFont:SYSTEMFONT(16) theColor:kColor_Rule_Black inSuperView:self.contentView];
        GLGWLabel *label = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:self.contentView];
        [label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
            make.left.equalTo(imagV.mas_right).offset(kWidthProportion_In_iPhoneTriploid(10));
            make.width.equalTo(@(kWidthProportion_In_iPhoneTriploid(200)));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
        }];
        label.text = @"陈也";
        
        GLGWLabel *label2 = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(12) theColor:[UIColor colorWithHexString:@"#999999"] inSuperView:self.contentView];
        [label2 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(label.mas_left);
            make.top.equalTo(label.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(4));
            make.width.equalTo(label.mas_width);
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(17)));
        }];
        label2.text = @"2018-09-25 12:00";
        //
        GLGWLabel *label3 = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:self.contentView];
        [label3 mas_updateConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(imagV.mas_left);
            make.top.equalTo(imagV.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(15));
            make.right.equalTo(@(-kWidthProportion_In_iPhoneTriploid(15)));
            make.bottom.equalTo(@(-kHeightProportion_In_iPhoneTriploid(162)));
        }];
        label3.text = @"混沌创业营新一期开始招生，想上得可以来找我推荐在这里交来找我推荐在这里交来找我推荐到很多良师益友，是幸福也是一辈子得财富。";
        label3.numberOfLines = 0;
        //
        
        GLGWLabel *label4 = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:self.contentView];
        [label4 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(imagV.mas_left);
            make.right.equalTo(label3.mas_right);
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
            make.bottom.equalTo(self.contentView.mas_bottom).offset(-kHeightProportion_In_iPhoneTriploid(15));
        }];
        label4.text = @"原文：混沌创业营新一期开始招生，想上得可以来找我推荐在这里交到很多良师益友，是幸福也是一辈子得财富。";
        
        GLGWView *baView = [[GLGWView alloc] initWithInSuperView:self.contentView];
        [baView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(label4.mas_top).offset(-kHeightProportion_In_iPhoneTriploid(15));
            make.left.equalTo(imagV.mas_left);
            make.right.equalTo(label3.mas_right);
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(97)));
        }];
        baView.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"];
        
        GLGWLabel *baLab1 = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#666666"] inSuperView:baView];
        [baLab1 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(@(kHeightProportion_In_iPhoneTriploid(12)));
            make.left.equalTo(baView.mas_left).offset(kWidthProportion_In_iPhoneTriploid(12));
            make.right.equalTo(baView.mas_right).offset(-kWidthProportion_In_iPhoneTriploid(12));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
        }];
        baLab1.text = @"陈也";
        
        GLGWLabel *baLab2 = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:baView];
        [baLab2 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(baLab1.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(6));
            make.left.equalTo(baLab1.mas_left);
            make.right.equalTo(baLab2.mas_right);
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
        }];
        baLab2.text = @"为什么要买？";
        
        GLGWLabel *baLab3 = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(12) theColor:[UIColor colorWithHexString:@"#999999"] inSuperView:baView];
        [baLab3 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(baLab2.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(10));
            make.left.equalTo(baLab2.mas_left);
            make.right.equalTo(baLab2.mas_right);
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(17)));
        }];
        baLab3.text = @"2018-09-25 12:00";
        
        
    }
    return self;
}

@end
